#ifndef _ADDNODE_H_
#define _ADDNODE_H_

#include "ExprNode.h"

class AddNode : public ExprNode {
public:
    AddNode(ExprNode *left, Token *add_token, ExprNode *right): ExprNode(add_token) {
        add_child(left);
        add_child(right);
    }
    int get_eval_type() {
        ExprNode *left = (ExprNode *)children[0];
        ExprNode *right = (ExprNode *)children[1];
        if (left->get_eval_type() == tINTEGER && right->get_eval_type() == tINTEGER)
            return tINTEGER;
        if (left->get_eval_type() == tVECTOR && right->get_eval_type() == tVECTOR)
            return tVECTOR;
        return tINVALID;
    }
};

#endif
